package cn.afterturn.svn.analysis.service.historypath;

import java.util.List;

import org.nutz.dao.QueryResult;
import org.nutz.dao.pager.Pager;
import org.nutz.ioc.loader.annotation.IocBean;
import org.nutz.log.Log;
import org.nutz.log.Logs;
import org.nutz.service.IdEntityService;

import cn.afterturn.svn.analysis.entity.historyinfo.HistoryInfoEntity;
import cn.afterturn.svn.analysis.entity.historypath.HistoryPathEntity;

/**
 *  文件路径服务
 * @author JueYue
 * @date 2015-07-29 15:40
 * @version V1.0  
 **/
@IocBean(name = "historyPathService", fields = { "dao" })
public class HistoryPathService extends IdEntityService<HistoryPathEntity> {

    private static final Log log = Logs.get();

    /**
     * 批量保存更新的相信路径
     * @param paths
     * @param e
     */
    public void batchSaveHistoryPath(List<HistoryPathEntity> paths, HistoryInfoEntity info) {
        HistoryPathEntity path;
        for (int i = 0; i < paths.size(); i++) {
            path = paths.get(i);
            if (info != null) {
                path.setHistoryId(info.getId());
            }
            dao().insert(path);
        }
    }

    public QueryResult getHistoryPathPage(HistoryPathEntity entity, Pager pager) {
        return null;
    }

}
